<section class="user-sidebar">

<h5 style="border-top-width: 0;"><i class="fa fa-wechat"></i>&nbsp;微信公众号</h5>
<ul class="nav nav-pills nav-stacked">
	<li {{if $current_controller=='wxes'}}class="active"{{/if}}><a href="{{Router::url('/wxes/mine')}}">我的公众号</a></li>
	
	<li {{if $current_model=='WxTimingBroad'}}class="active"{{/if}}><a href="{{Router::url('/wx_timing_broads/mine')}}">定时群发</a></li>
	<li {{if $current_model=='Signature' && $current_action=='mine'}}class="active"{{/if}}><a href="{{Router::url('/signatures/mine')}}">{{__('文章签名')}}</a></li>

	<li {{if $current_controller=='user_settings'}}class="active"{{/if}}><a href="{{Router::url('/user_settings/setting')}}">参数配置</a></li>

</ul>

<!-- 
{{if ModelExists('want') && ModelExists('trade') }}
	<h5><i class="fa fa-life-ring"></i>&nbsp;{{__('Supply and Demand')}}</h5>
	<ul class="nav nav-pills nav-stacked">
		<li {{if $current_model=='Want'}}class="active"{{/if}}><a href="{{Router::url('/wants/mine')}}">{{lang('want')}}</a></li>
		<li {{if $current_model=='Rent'}}class="active"{{/if}}><a href="{{Router::url('/rents/mine')}}">{{lang('rent')}}</a></li>
		<li {{if $current_model=='Trade'}}class="active"{{/if}}><a href="{{Router::url('/trades/mine')}}">{{lang('trade')}}</a></li>
	</ul>
{{/if}}
 -->

<h5><i class="fa fa-user"></i>&nbsp;{{__('团队与协作')}}</h5>
<ul class="nav nav-pills nav-stacked">	
	<li {{if $current_model=='Company'}}class="active"{{/if}}><a href="{{Router::url('/companies/mine')}}">{{__('公司信息')}}</a></li>
	<li {{if $current_model=='Team'}}class="active"{{/if}}><a href="{{Router::url('/teams/mine')}}">{{__('团队管理')}}</a></li>
	<li {{if $current_model=='Daily'}}class="active"{{/if}}><a href="{{Router::url('/dailys/mine')}}">{{__('工作日报')}}</a></li>
	<li {{if $current_model=='Schedule'}}class="active"{{/if}}><a href="{{Router::url('/schedules/calendar')}}">{{__('日程安排')}}</a></li>
	<li {{if $current_model=='Customer'}}class="active"{{/if}}><a href="{{Router::url('/customers/mine')}}">{{__('客户关系管理')}}</a></li>
</ul>


<h5><i class="fa fa-user"></i>&nbsp;{{__('微信小程序')}}</h5>
<ul class="nav nav-pills nav-stacked">	
	<li {{if $current_model=='LittleApp'}}class="active"{{/if}}><a href="{{Router::url('/little_apps/mine')}}">{{__('小程序')}}</a></li>
	<!-- <li {{if $current_model=='AppForum'}}class="active"{{/if}}><a href="{{Router::url('/app_forums/mine')}}">{{__('微社区')}}</a></li> -->
</ul>



<h5><i class="fa fa-wechat"></i>&nbsp;第三方功能模块</h5>
<ul class="nav nav-pills nav-stacked">
	<li {{if $current_model=='WxMenu'}}class="active"{{/if}}><a href="{{Router::url('/wx_menus/mine')}}">自定义菜单</a></li>
	<li {{if $current_model=='WxAutoReply'}}class="active"{{/if}}><a href="{{Router::url('/wx_auto_replies/mine')}}">自动回复</a></li>
	<li {{if $current_model=='WxActivity'}}class="active"{{/if}}><a href="{{Router::url('/wx_activities/mine')}}">微活动</a></li>
	<li {{if $current_model=='Questionnaire'}}class="active"{{/if}}><a style="color:red;" href="{{Router::url('/questionnaires/mine')}}">数据表单</a></li>
	
	<!-- <li {{if $current_model=='WxShortMsg'}}class="active"{{/if}}><a href="{{Router::url('/wx_short_msgs/mine')}}">消息管理</a></li>
	  -->
	<!--
	<li {{if $current_model=='WxStorefront'}}class="active"{{/if}}><a href="{{Router::url('/wx_storefronts/mine')}}">服务门店</a></li>
	<li {{if $current_model=='WxPromotion'}}class="active"{{/if}}><a href="{{Router::url('/wx_promotions/mine')}}">优惠活动</a></li>
 -->
	{{if $CurrentUser['id'] == 1 }}
	<li {{if $current_model=='WxImg'}}class="active"{{/if}}><a href="{{Router::url('/wx_imgs/mine')}}">微信配图</a></li>
	{{/if}}
</ul>


<h5><i class="fa fa-user"></i>&nbsp;{{__('商户订单')}}</h5>
<ul class="nav nav-pills nav-stacked">
	<li {{if $current_model=='Order' && $_REQUEST['type']=='shop' && !isset($_REQUEST['status']) }}class="active"{{/if}}><a href="{{Router::url('/orders/mine?type=shop')}}">全部订单</a></li>
	{{if $reserve_shopids&&in_array($current_user_id,$reserve_shopids)}}
	<li {{if $current_model=='Order' && $_REQUEST['type']=='shop' && $_REQUEST['status']==-10}}class="active"{{/if}}><a href="{{Router::url('/orders/mine?type=shop&status=-10')}}">待确认</a></li>
	<li {{if $current_model=='Order' && $_REQUEST['type']=='shop' && $_REQUEST['status']==0}}class="active"{{/if}}><a href="{{Router::url('/orders/mine?type=shop&status=0')}}">待付款</a></li>
	{{/if}}
	<li {{if $current_model=='Order' && $_REQUEST['type']=='shop' && $_REQUEST['status']==1}}class="active"{{/if}}><a href="{{Router::url('/orders/mine?type=shop&status=1')}}">待发货</a></li>
	<li {{if $current_model=='Order' && $_REQUEST['type']=='shop' && $_REQUEST['status']==2}}class="active"{{/if}}><a href="{{Router::url('/orders/mine?type=shop&status=2')}}">已发货</a></li>
</ul>

<h5><i class="fa fa-user"></i>&nbsp;{{__('Personal Center')}}</h5>
<ul class="nav nav-pills nav-stacked">
<li {{if $current_model=='User' && $current_action=='permission'}}class="active"{{/if}}><a href="{{Router::url('/users/permission')}}">{{__('My Permissions')}}</a></li>
<li {{if $current_model=='Order' && !isset($_REQUEST['type']) }}class="active"{{/if}}><a href="{{Router::url('/orders/mine')}}">{{__('My Orders')}}</a></li>
<li {{if $current_model=='OrderInvoice'}}class="active"{{/if}}><a href="{{Router::url('/order_invoices/mine')}}">发票申请</a></li>

<li {{if $current_model=='User' && $current_action=='bindMobile'}}class="active"{{/if}}><a href="{{Router::url('/users/bindMobile')}}">{{__('绑定手机号')}}</a></li>
<li><a href="{{Router::url('/users/index')}}">{{__('绑定第三方')}}</a></li>

<li  class="{{if $current_model=='Shortmessage' && $current_action=='mine'}}active{{/if}}"><a href="{{Router::url('/shortmessages/mine')}}">站内消息 <span class="user-unread-msgnum">0</span></a></li>

<li {{if $current_model=='User' && $current_action=='score'}}class="active"{{/if}}><a href="{{Router::url('/users/score')}}">{{__('My Scores')}}</a></li>
<li {{if $current_model=='User' && $current_action=='invite'}}class="active"{{/if}}><a href="{{Router::url('/users/invite/'.$current_user_id)}}">{{__('My Invites')}}</a></li>

<!-- <li {{if $current_model=='User' && $current_action=='edit'}}class="active"{{/if}}><a href="{{Router::url('/users/edit')}}">{{__('Edit Profile')}}</a></li> -->
<li {{if $current_action=='editpassword'}}class="active"{{/if}}><a href="{{Router::url('/users/editpassword')}}">{{__('Edit Password')}}</a></li>

<!-- 
<li class="nav-header">信息发布</li>
<li {{if $current_action=='note'}}class="active"{{/if}}><a href="{{Router::url('/notes/lists')}}">我的记事</a></li>
<li {{if $current_action=='book'}}class="active"{{/if}}><a href="{{Router::url('/books/lists')}}">我的知识</a></li>
<li {{if $current_action=='bookchapter'}}class="active"{{/if}}><a href="{{Router::url('/book_chapters/lists')}}">知识章节</a></li>
 -->
{{$this->Hook->call('userLeftmenu',array($type))}}
</ul>

	<h5><i class="fa fa-life-ring"></i>&nbsp;{{__('135开放平台')}}</h5>
	<ul class="nav nav-pills nav-stacked">
		<!-- <li {{if $current_controller=='user_settings' && $_REQUEST['type']=='dev'}}class="active"{{/if}}><a href="{{Router::url('/user_settings/setting')}}?type=dev">微信开发者配置</a></li> -->

		<li {{if $current_model=='Appkey'}}class="active"{{/if}}><a href="{{Router::url('/appkeys/mine')}}">{{__('Appkey 管理')}}</a></li>
		<li {{if $current_model=='Token'}}class="active"{{/if}}><a href="{{Router::url('/tokens/mine')}}">{{__('Token 管理')}}</a></li>
	</ul>

</section>
